<?php
defined('SYS_RUN') or exit();

class Request {
    
    private static $_requestData = array();

    public function __construct () {
        foreach ($_POST as $key => $value)
            self::$_requestData[$key] =  $value;

        foreach ($_GET as $key => $value)
            self::$_requestData[$key] = $value;

        array_decodeURI(self::$_requestData);
    }

    public function get ($name) {
        if (isset(self::$_requestData[$name]))
            return self::$_requestData[$name];
        else
            return "";
    }

    public function getAll() {
        return self::$_requestData;
    }

    public function getArray($s_name) {
        return (array)(isset(self::$_requestData[$s_name]) ? self::$_requestData[$s_name] : array());
    }
}